#pragma once
#ifndef CGUIBUTTON_H_
#define CGUIBUTTON_H_

#include "GUI.h"

namespace GUI
{
	class CGUIButton : public CGUIBase{
	private:
		LPCSTR m_Text;
		UINT m_Event;
		void* m_pDest;
	public:
		CGUIButton(GUI_PARAMS* params, GUI_COLORS* colors, GUI_SPRITES* sprites, UINT _event, void* _dest, LPCSTR _text);
		~CGUIButton();

		virtual bool WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
		virtual bool HandleKeyboard( UINT uMsg, WPARAM wParam, LPARAM lParam );
		virtual bool HandleMouse( UINT uMsg, WPARAM wParam, LPARAM lParam );

		virtual bool RequestFocus();
		virtual bool CanHaveFocus();
		virtual void OnFocusIn();
		virtual void OnFocusOut();
		virtual void OnMouseEnter();
		virtual void OnMouseLeave();
		virtual void OnHotkey();

		virtual void Step();
		virtual void Draw();

		void SetText( LPCSTR _text ) { m_Text=_text; }
		LPCSTR GetText() { return m_Text; }
	};
}

#endif